/*
 * Copyright © 2016 Cask Data, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

@font-color: #333333;
@cdap-orange: #ff6600;
@svg-background: #e8e8e8;
@border-color: #cccccc;
@bar-color: #b9b9b9;
@tracker-blue: #0077dc;

my-histogram {
  .graph-container {
    border: 1px solid @border-color;
    border-radius: 4px;
    margin-top: 20px;
    max-width: 100%;
    overflow: hidden;
  }

  .histogram-container {
    .axis {
      path,
      line {
        fill: none;
        stroke: @border-color;
        shape-rendering: crispEdges;
      }

      text {
        font-weight: 600;
        fill: @font-color;
      }
      &.x text { font-size: 13px; }
      &.y text { font-size: 12px; }
    }

    svg { background-color: @svg-background; }

    .bar {
      fill: @bar-color;

      &:hover { fill: @tracker-blue; }
    }
  }
}

.d3-tip.tracker-audit-histogram {
  line-height: 1;
  font-weight: bold;
  padding: 7px 10px;
  background: rgba(0, 0, 0, 0.8);
  color: white;

  /* Creates a small triangle extender for the tooltip */
  &:after {
    box-sizing: border-box;
    font-size: 12px;
    width: 100%;
    line-height: 1;
    color: rgba(0, 0, 0, 0.8);
    content: "\25BC";
    position: absolute;
    text-align: center;
  }

  &.n:after {
    margin: -3px 0 0 0;
    top: 100%;
    left: 0;
  }
}
